package org.naigu.peach.biz.form;

import org.hibernate.validator.constraints.Length;
import org.naigu.peach.dal.dataobject.SubjectDO;

import javax.validation.constraints.NotNull;


public class SubjectForm {

    @NotNull(message = "不能为空")
    @Length(min = 1,max = 60,message = "长度不能超过60")
    private String subjectText;
    private String subjectComment;

    public String getSubjectText() {
        return subjectText;
    }

    public void setSubjectText(String subjectText) {
        this.subjectText = subjectText;
    }

    public String getSubjectComment() {
        return subjectComment;
    }

    public void setSubjectComment(String subjectComment) {
        this.subjectComment = subjectComment;
    }

    public SubjectDO toDO() {
        SubjectDO subjectDO = new SubjectDO();
        subjectDO.setSubjectComment(subjectComment);
        subjectDO.setSubjectText(subjectText);
        return subjectDO;
    }

}
